<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
    <head>
        <meta name="description" content="Sistema XDBForms" />
        <meta name="keywords" content="ServiceXDBForms, XForms, L'Aquila, Università, Master in Web Technology" />
        <meta name="author" content="Stefano D'Alessandro &amp; Paolo Loberto &amp; Roberto Marino" />

        <!-- CSS -->
        <link rel="stylesheet" type="text/css" href="./layout/css/styleServiceXDBForms.css" title="styleServiceXDBForms" media="screen,projection" />

        <title>ServiceXDBForms</title>
    </head>
    <body>
        <div id="wrap">
            <!--Blocco Header-->
            <div id="header">
                <p id="toplinks">
                    Skip to: <a class="tl" href="#content">Content</a> | <a class="tl" href="#footer">Footer</a>
                </p>
                <img id="gecoMWT" src="./layout/img/GecoRotate.png" alt="Geco MWT" width="68" height="62"/>
                <h1>Service<span class="fade">XDB</span>Forms</h1>
                <img id="imgLogoMWT" src="./layout/img/Scritta.png" alt="Logo MWT" width="95" height="22"/>
            </div>
            <%
                String tecnologia = (String) request.getAttribute("tecnologia");
                String operation = (String) request.getAttribute("operation");
            %>

            <!--Blocco Center-->
            <fieldset id="fieldset">
                <legend class="fieldsetLabel">Client Web</legend>
                <div id="content" class="ccontent">
                    <form id="form" class="cform" action="${pageContext.request.contextPath}/RemoteCall" method="post">
                        <div id="tecnologia" class="ctecnologia spaceBottom">
                            <label>Tecnologia:</label>
                            <select id="tech" class="selectT" name="tecnologia">
                                <%--${requestScope.tecnologia eq 'XmlRpcCall'}--%>
                                <option <% if ("XmlRpcCall".equals(tecnologia)) out.write("selected=\"selected\""); %> value="XmlRpcCall">XML-RPC</option>
                                <option <% if ("JaxWsCall".equals(tecnologia)) out.write("selected=\"selected\""); %> value="JaxWsCall">JAX-WS</option>
                            </select>
                        </div>
                        <div id="servizio" class="cservizio spaceBottom">
                            <label>Operazione:</label
                            <select class="selectS" name="operation">
                                <option <% if ("CreateXForm".equals(operation)) out.write("selected=\"selected\""); %> value="CreateXForm">CreateXForm</option>
                                <option <% if ("CreateInsertCode".equals(operation)) out.write("selected=\"selected\""); %> value="CreateInsertCode">CreateInsertCode</option>
                                <option <% if ("CreateUpdateCode".equals(operation)) out.write("selected=\"selected\""); %> value="CreateUpdateCode">CreateUpdateCode</option>
                            </select>
                        </div>        
                        <div id="statement" class="cstatement spaceBottom">
                            <label>Statement SQL</label>
                            <textarea class="ta" name="statement">${requestScope.statement}</textarea>
                        </div>
                        <div id="invioDati" class="cstatement spaceBottom">
                            <input type="submit" title="submit" value="Submit"></input>
                        </div>
                    </form>
                    <label class="labelOutput">Output</label>
                    <div id="output" class="coutput">
                        <textarea readonly class="soutput">${requestScope.result}</textarea>
                    </div>
                </div>
            </fieldset>

            <!--Blocco Footer-->
            <div id="footer">
                <p><a href="#">Contact us</a> | <a href="#header">Back to top</a><br />
                &copy; 2010 <a href="#">ServiceXDBForms</a></p>
            </div>
        </div>
    </body>
</html>
